<?php
/**
 * Created by laoyu.
 * User: hilaoyu@qq.com
 * Date: 2018/5/22
 * Time: 17:11
 */

namespace Hilaoyu\LaravelExtend\Providers;

use Hilaoyu\LaravelExtend\Services\Files\FileService;
use Hilaoyu\LaravelExtend\Supports\SubApp;
use Hilaoyu\Utils\UtilSupport;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;

class ThirdPartyLoginServiceProvider extends BaseServiceProvider
{
    public function boot()
    {

    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        $this->mergeConfigFrom($this->configPath(), 'third_party_login');
        SubApp::registerRoutes(dirname(__DIR__) . '/Services/ThirdPartyLogin/routes','Hilaoyu\\LaravelExtend\\Services\\ThirdPartyLogin\\Controllers',[
            'name'=>'l-e-s',
            'prefix'=>'_les',
        ]);
    }


    protected function configPath()
    {
        return dirname(__DIR__) . '/Services/ThirdPartyLogin/config/third_party_login.php';
    }
}
